import numpy
import os

#path = 'C:/Users/Kseniya/workspace/MultilayerPerceptron/res/'
print os.path.normpath(os.path.join(os.getcwd(), ".."))
currpath = os.path.normpath(os.path.join(os.getcwd(), "..", 'res'))
print currpath

Ttrain = numpy.fromfile(open(currpath + os.sep + 'train-labels.idx1-ubyte','r'),dtype='ubyte',count=8+60000)[8:,numpy.newaxis]